import { $freePost, $post } from '@js/request'
import { SMSCode } from '@js/config';

export async function sendSMSRequest (mobile: string): Promise<void> {
  const res = await $freePost('/api/common/sms', {
    mobile,
    template_code: SMSCode
  })
  return res.data
}

export async function modifyPasswordRequest (data: { [k: string]: any }): Promise<void> {
  const res = await $post('/api/common/edit_password', data)
  return res.data
}

export async function logoutRequest (): Promise<void> {
  const res = await $post('/api/common/logout')
  return res.data
}